package viewInterfaces;

import java.io.File;

import javax.swing.JFileChooser;

import model.Project;

import view.ViewProjectManagement;
import controllerInterfaces.IControllerProjectManagement;

/**
*
* Interface of {@link ViewProjectManagement} controller class according to Abstract Factory design pattern.
*/
public interface IViewProjectManagement {
	
	/**
	 * Set the MVC++ Controller Class for this View.</br>
	 * ControllerProjectManagement is manipulable through {@link IControllerProjectManagement} interface
	 * @param	controller	MVC++ Controller
	 * @see	ControllerProjectManagement
	 * @see IControllerProjectManagement
	 */
	public void setController(IControllerProjectManagement controller);
	
	/**
	 * Invoke a user interface for create a new project
	 * @see Project
	 */	
	public void New();
	
	
	/**
	 * Invoke a user interface for load a existent project from file
	 * @see Project
	 */	
	public Object Load();
	
	
    /**
     * Creates the file chooser the user will use to save files of {@link Project}.
     * @param object project object to save
     * @return operation status
     * @return status of saved operation. True for valid operation, otherwise, invalid operation.     * 
     * @see Project
     */		
	public boolean Save(Object object);
	

	
    /**
     * Save {@link Project} current file.
     * @param object current project object.
     * @param sFile	project file.
     * @return status of saved operation. True for valid operation, otherwise, invalid operation.
     * @see Project
     */	
	public boolean Save(Object project, File sFile);	
	

    /**
     * Set a text field of project name.</br>
	 * This method is only used for realize unit testing.
     * @param name project name
     */
    public void setProjectNameText(String name);
    
    
    /**
	 * Create a new project.
	 */
    public void createProject();
    
    
	/**
	 * Get file chooser.</br>
	 * This method is only used for realize unit testing.
	 * @return file chooser
	 */
	public JFileChooser getFileChooser();
}
